


export function getCache(key) {
  let value = window.localStorage.getItem(key) || null
  return value ? JSON.parse(value) : value
}

export function setCache(key, value) {
  if(value) {
    window.localStorage.setItem(key, JSON.stringify(value))
  } else {
    window.localStorage.setItem(key, value)
  }
}